// phalanx safe_bool.hpp.cu header file

// Copyright (c) 2010 - 2011 Kohei Takahashi (Flast).
// Distributed under the MIT license. for more detail see COPYING.

#ifndef IG_PHALANX_TYPE_TRAITS_DETAIL_SAFE_BOOL_HPP_CU_ONCE_
#define IG_PHALANX_TYPE_TRAITS_DETAIL_SAFE_BOOL_HPP_CU_ONCE_

#include <phalanx/config.hpp.cu>

namespace phalanx
{

namespace safe_bool_detail
{

struct safe_bool_impl
{
    struct _dummy_type {} _dummy;

    PHALANX_CONFIG_DEFAULT_FUNCTION( true )
    static _dummy_type safe_bool_impl::*
    true_( void )
    { return &safe_bool_impl::_dummy; }

    PHALANX_CONFIG_DEFAULT_FUNCTION( true )
    static _dummy_type safe_bool_impl::*
    false_( void )
    { return 0; }
};

typedef safe_bool_impl::_dummy_type safe_bool_impl::* safe_bool;

} // namespace safe_bool_detail

} // namespace phalanx

#endif // IG_PHALANX_TYPE_TRAITS_DETAIL_SAFE_BOOL_HPP_CU_ONCE_

